import java.util.Scanner;

public class SumNum {
    //递归求和
    public static int sum(int k) {
        if (k == 1) {
            return 1;
        }
        return k + sum(k - 1);
    }

    public static void main(String[] args) {
        System.out.println("请输入你要求和的整数：");
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        System.out.println(sum(n));
    }
}
